Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

samples: migrate samples from java-docs-samples #73

Merged
merged 17 commits into from
Aug 31, 2020
Merged

samples: migrate samples from java-docs-samples #73

merged 17 commits into from
Aug 31, 2020

Conversation

chingor13
Copy link
Contributor

@chingor13 chingor13 commented Feb 27, 2020

Migrates the samples that still work from https://github.com/GoogleCloudPlatform/java-docs-samples

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Feb 27, 2020
@codecov
Copy link

codecov bot commented Feb 27, 2020

Codecov Report

Merging #73 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #73   +/-   ##
=========================================
  Coverage     75.36%   75.36%           
  Complexity      548      548           
=========================================
  Files            48       48           
  Lines          4992     4992           
  Branches         44       44           
=========================================
  Hits           3762     3762           
  Misses         1174     1174           
  Partials         56       56           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 06f50ce...fd0c828. Read the comment docs.

@chingor13 chingor13 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 28, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 28, 2020
@chingor13 chingor13 marked this pull request as ready for review February 28, 2020 19:20
@chingor13 chingor13 requested a review from lesv March 2, 2020 17:18
lesv
lesv previously requested changes Mar 2, 2020
Copy link

@lesv lesv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PTAL - RFC 2606 & 6761 example.com
In general, we don't like to use com.google in samples as users might copy them by accident.

If these aren't new files, then the 2019 copyright is ok, but if they are all new, then they should be updated to 2020.

It's idiomatic java to just let exceptions propagate unless your going to do something about them. If we can explain why they might get an exception it's good, it's better if we can suggest a mitigation strategy. Printing a stack trace isn't typically what we want users doing in production code.

I like how you've done the 3 pom's. that looks like a great strategy.

@chingor13 chingor13 closed this Apr 7, 2020
@dzlier-gcp
Copy link
Contributor

Wondering why this was closed without merging? These samples would be good to include at https://cloud.google.com/game-servers/docs.

@lesv lesv reopened this Aug 27, 2020
@lesv
Copy link

lesv commented Aug 27, 2020

I think it conflicts now - we may need to try again.

@chingor13
Copy link
Contributor Author

The alpha client's samples were not used on cloudsite and the API surface area on the alpha client significantly changed/broke (samples no longer compiled). The service now has published both a beta and GA endpoint whose clients are now available here.

@dzlier-gcp dzlier-gcp requested a review from a team August 27, 2020 22:38
@dzlier-gcp
Copy link
Contributor

Merged and resolved conflicts through github UX, let's see how it does with tests.

@product-auto-label product-auto-label bot added the api: gameservices Issues related to the googleapis/java-game-servers API. label Aug 28, 2020
@dzlier-gcp dzlier-gcp added kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Aug 28, 2020
@yoshi-kokoro yoshi-kokoro removed kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. labels Aug 28, 2020
@dzlier-gcp
Copy link
Contributor

Got all tests passing.

Copy link

@lesv lesv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - there is one question re: GameServicesTestUtil.java - Why do you catch and printout errors rather than just letting things fail.

.kokoro/presubmit/samples.cfg Outdated Show resolved Hide resolved
.kokoro/presubmit/integration.cfg Outdated Show resolved Hide resolved
@dzlier-gcp
Copy link
Contributor

Reverting changes to kokoro config GOOGLE_APPLICATION_CREDENTIALS.

@dzlier-gcp dzlier-gcp merged commit f775977 into master Aug 31, 2020
@dzlier-gcp dzlier-gcp deleted the samples branch August 31, 2020 21:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: gameservices Issues related to the googleapis/java-game-servers API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants